package com.cskaoyan.service;

import com.cskaoyan.bean.Goods;
import com.cskaoyan.bean.GoodsProduct;
import com.cskaoyan.bean.goodsbean.goodsbo.CreateGoodsBO;
import com.cskaoyan.bean.goodsbean.goodsbo.DeleteGoodsBo;
import com.cskaoyan.bean.goodsbean.goodsbo.UpdateGoodsBO;
import com.cskaoyan.bean.goodsbean.goodsvo.CatAndBrandVO;
import com.cskaoyan.bean.goodsbean.goodsvo.GoodsDetailVO;
import com.cskaoyan.bean.goodsbean.goodsvo.GoodsListVO;

import java.sql.SQLException;

public interface GoodsService {
	GoodsListVO selectGoodsList(String goodsSn, String name, Integer page, Integer limit, String sort, String order);

	void createGoods(CreateGoodsBO createGoodsBO);

	GoodsDetailVO getGoodsDetail(Integer id);

	CatAndBrandVO getCatAndBrand();


	void updateGoods(UpdateGoodsBO updateGoodsBO);

	void deleteGoods(DeleteGoodsBo deleteGoodsBo);

    GoodsProduct hasEnoughStock(Integer productId, Integer demand);

	GoodsProduct updateProductStock(int productId, int num) throws SQLException;

	Boolean contains(String goodsId);
}
